package com.huitu.whht.ribbon_customer.util;


/**
 * 响应码枚举，参考HTTP状态码的语义
 */
public enum ResponseCode implements ErrorInfoInterface {

	SUCCESS(200, "OK"),
	PARAM_ERROR(20000, "参数异常"),
	BAD_REQUEST(20001, "请求无效"),
	UNAUTHORIZED(20002, "未授权"),
	NOT_FOUND(20004, "无效的资源"),
	INTERNAL_SERVER_ERROR(20005, "服务器内部错误"),
	CALL_REMOTE_API_ERROR(20006, "调用远程接口失败"),
	INVALID_TOKEN(8001, "无效的TOKEN");
	private Integer code;
	private String msg;

	ResponseCode(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	@Override
	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	@Override
	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

}
